using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;

namespace SubSonic.Security.Data{
    public partial class SPs{
        
        /// <summary>
        /// Creates an object wrapper for the UserInRole Procedure
        /// </summary>
        public static StoredProcedure UserInRole(string UserName, string RoleName, bool? isInRole)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("UserInRole" , DataService.GetInstance("SubSonicProviders"));
        	
            sp.Command.AddParameter("@UserName", UserName,DbType.String);
        	    
            sp.Command.AddParameter("@RoleName", RoleName,DbType.String);
        	    
            sp.Command.AddOutputParameter("@isInRole",DbType.Boolean);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the DeleteUserFromRole Procedure
        /// </summary>
        public static StoredProcedure DeleteUserFromRole(string username, string roleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("DeleteUserFromRole" , DataService.GetInstance("SubSonicProviders"));
        	
            sp.Command.AddParameter("@username", username,DbType.String);
        	    
            sp.Command.AddParameter("@roleName", roleName,DbType.String);
        	    
            return sp;
        }

        
        /// <summary>
        /// Creates an object wrapper for the AddUserToRole Procedure
        /// </summary>
        public static StoredProcedure AddUserToRole(string username, string roleName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("AddUserToRole" , DataService.GetInstance("SubSonicProviders"));
        	
            sp.Command.AddParameter("@username", username,DbType.String);
        	    
            sp.Command.AddParameter("@roleName", roleName,DbType.String);
        	    
            return sp;
        }

        
    }

    
}

